From: Richard M. Stallman Date: Sat, 12 Jun 1993 07:19:24 +0000 (+0000) Subject: (Fexpt): New local `val' for making integer to return. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~95387 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=4be1d460883bc7386caf514f1817d09238a2754d;p=emacs.git (Fexpt): New local `val' for making integer to return. --- diff --git a/src/floatfns.c b/src/floatfns.c index ca50a920f3c..90a2186d3f6 100644 --- a/src/floatfns.c +++ b/src/floatfns.c @@ -406,7 +406,8 @@ DEFUN ("expt", Fexpt, Sexpt, 2, 2, 0, (XTYPE (arg2) == Lisp_Int)) /* don't promote, if both are ints */ { /* this can be improved by pre-calculating */ int acc, x, y; /* some binary powers of x then accumulating */ - /* these, thereby saving some time. -wsr */ + Lisp_Object val; + x = XINT (arg1); y = XINT (arg2); acc = 1; @@ -431,8 +432,8 @@ DEFUN ("expt", Fexpt, Sexpt, 2, 2, 0, y = (unsigned)y >> 1; } } - XSET (x, Lisp_Int, acc); - return x; + XSET (val, Lisp_Int, acc); + return val; } f1 = (XTYPE (arg1) == Lisp_Float) ? XFLOAT (arg1)->data : XINT (arg1); f2 = (XTYPE (arg2) == Lisp_Float) ? XFLOAT (arg2)->data : XINT (arg2);